<template>
  <div>
    <div class="report">
      <!-- v-for="item in list" :key="item.id" -->
      <div class="report_item" v-for="item in list" :key="item.id">
        <div class="report_item_left">
          <div
            class="report_item_left_title"
            style="
              width: 100%;
              display: flex;
              justify-content: space-between;
              position: relative;
            "
          >
            <div class="text1" style="width:80%; margin-bottom: 0"><tag-view :item='item' other='1'></tag-view>{{item.position}}</div>
            
            <div class="withdraw">
              <div class="withdraw_item" style="margin-top: 20px;" @click="cancelPowerAttorney(item)">撤销委托</div>
            </div>
          </div>
          <div>委托时间：{{item.createDate}}</div>
        </div>
      </div>
      <!-- <div class="fenye">
        <el-pagination
          @current-change="searchCurrentChange"
          background
          layout="prev, pager, next"
          :total="searchTotal"
          :current-page="searchPage.PageNo"
          :page-size="searchPage.pageSize"
        ></el-pagination>
      </div> -->
    </div>
  </div>
</template>

<script>
export default {
  props: {
    types: {
      type: String,
    },
    list:{
      type:Array,default(){
        return []
      }},
      
    
  },
  data(){
    return {
      // list:[]
    }
  },
  methods:{
			// 撤销委托
			cancelPowerAttorney(item){
				this.$postHttp("/api/mobile/public/revocationDelegation", {
					userId:JSON.parse(localStorage.getItem("userInfo")).id,
					id:item.id
				}).then(res => {
					if (res.code == 200) {
						this.mySuccessMessage(res.msg)
						this.$emit('refresh')
					}
				});
			},
  }
};
</script>

<style  lang="less" scoped>
.text1{
  overflow: hidden;text-overflow:ellipsis;white-space: nowrap;
}
div,span {
    color: #333333;
}
.report_item_left_title{
  font-size: 22px;
  font-weight: 500;
  color: #333333;
}
.report {
  display: flex;
  flex-direction: column;
  .report_itemse {
    width: 100%;
    box-sizing: border-box;
    height: 200px;
    padding: 25px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 10px solid #f2f2f2;
  }
  .report_item {
    width: 100%;
    // height: 200px;
    box-sizing: border-box;
    padding: 25px 35px;
    // display: flex;
    // justify-content: space-between;

    align-items: flex-start;
    border-bottom: 10px solid #f2f2f2;
    .report_item_left {
      flex: 4;
      display: flex;
      flex-direction: column;
      div {
        margin-bottom: 12px;
      }
    }
    .withdraw {
      flex: 1;
      position: absolute;

      top: 50%;
      right: 20px;
      transform: translateY(-50%);
      .withdraw_item {
        width: 120px;
        height: 42px;
        border: 1px solid #64b6a8;
        border-radius: 20px;
        font-size: 19px;
        font-weight: 400;
        color: #64b6a8;
        text-align: center;
        line-height: 42px;
        cursor: pointer;
        margin: 0 auto;
      }
    }
  }
}
.fenye {
  width: 100%;
  height: 50px;
  text-align: center;
  margin: 60px 0px;
  /deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: #64b6a8;
  }
}
</style>